{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <link rel="shortcut icon" href="#"/>
    <link rel="stylesheet" href="{% static 'plugins/bootstrap-3.4.1-dist/css/bootstrap.css' %}">
    <link rel="stylesheet" href="{% static 'css/common.css' %}">
    <link rel="stylesheet" href="{% static 'css/login.css' %}">
</head>
<body>
<div class="box">
    <h1>用户登录</h1>
    <form action="" method="post" class="form-horizontal">
        {% csrf_token %}

        {% for field in form %}
            <div class="form-group form_input">
                <label class="col-sm-2 control-label">{{ field.label }}</label>
                <div class="col-sm-10">
                    {{ field }}
                    <span class="data_error">{{ field.errors.0 }}</span>
                </div>
            </div>
        {% endfor %}

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary">登 录</button>
                <span class="login_error">{{ error }}</span>
                <a class="f_right" href="{% url 'email_login' %}">邮箱登录</a>
            </div>
        </div>
    </form>
</div>
</body>
</html>